package com.yf.service;

import com.yf.entity.TokenEntity;
import com.yf.entity.UserEntity;
import com.yf.entity.WxUser;
import com.yf.service.BaseService;
import com.yf.vo.UserVO;

import java.util.Date;

/**
 * 用户Service接口
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Tue Dec 11 16:26:15 CST 2018
 */
public interface UserService extends BaseService<UserEntity>{

    /**
     * 注册用户
     * @param
     * @param parentId
     * @return
     */
    TokenEntity registerUser(WxUser wxUser, Long parentId);

    /**
     * 验证用户是否登录
     * @return
     */
    TokenEntity validateLogin(UserEntity userEntity);

    /**
     * 通过统一ID获取
     * @return
     */
    UserEntity findByUnionId(String unionId);

    UserEntity login(String phone,String password);


    //基本信息
    UserVO getInfo(Long userId);

    //保存基本信息
    void saveInfo(Long userId,String sex, String phone, String realName, String idNumber, Date birthday, String address);

}
